package interpreter;

import lombok.AllArgsConstructor;

import java.util.HashMap;

/**
 * 变量的解释器
 */
@AllArgsConstructor
public class VarExpression implements Expression {
    private String key; //key =a,key=b,key=c

    @Override
    public int interpreter(HashMap<String, Integer> var) {
        return var.get(this.key);
    }
}
